home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_bosscut.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  96 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_BossCut.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ===================================================================
  10.  
  11. symbols
  12.  
  13.     message        startup
  14.     message        entered
  15.     
  16.     thing       player              local
  17.     thing        t_Boss                local
  18.     thing       indy                local
  19.     thing        t_BossGhost
  20.     thing       cam1
  21.     thing       target1     #walk player to this
  22.     
  23.     sector        sec_TriggerBoss
  24.     
  25.     cog            cog_boss
  26.     
  27.     sound       inSay1=Tm04j01.wav      local
  28.     
  29.     template    tplActor=indy_sh_actor              local
  30.     
  31.     int            n_BossCreated=0        local
  32.  
  33. end
  34.  
  35.  
  36. # ===================================================================
  37. code
  38.  
  39. startup:
  40.  
  41.     player = GetLocalPlayerThing();
  42.  
  43.     return;
  44.  
  45.  
  46. # ===================================================================
  47. entered:
  48.  
  49.     if (GetSenderRef() == sec_TriggerBoss && !n_BossCreated)
  50.     {
  51.         print("sent create boss");
  52.         n_BossCreated = 1;
  53.  
  54.         # Send User0 msg == special 'Create' Boss msg
  55.         t_Boss = SendMessageEx(cog_Boss, 27, t_BossGhost, 0, 0, 0);        # (cogRef, User0, Location-Thing, 0, 0, 0)
  56.  
  57.         # Cut to cam1
  58.         SetCameraFocus(2, cam1);
  59.         SetCameraSecondaryFocus(2, t_BossGhost);
  60.         SetCurrentCamera(2);
  61.         SetCameraFOV(90, 0, 0.0);
  62.         
  63.         # hide player and create actor
  64.         SetThingFlags(player, 0x80000);
  65.         indy = CreateThing(tplActor, player);
  66.         CaptureThing(indy);
  67.         CopyPlayerHolsters(player, indy);
  68.         ClearThingFlags(indy, 0x80000);
  69.         
  70.         # walk actor to target1
  71.         AISetMoveSpeed(indy, 1.2);
  72.         AISetLookThing(indy, target1);
  73.         AISetMoveThing(indy, target1, 1);
  74.         
  75.         Sleep(0.5);
  76.         PlayVoice(player, inSay1, 1.0, 1);
  77.         Sleep(0.5);
  78.         
  79.         # Get the player into position
  80.         CopyOrientAndPos(indy, player);
  81.         SetThingFlags(indy, 0x80000);
  82.         ClearThingFlags(player, 0x80000);
  83.         #ClearActorFlags(player, 0x200000);
  84.         
  85.         # Reset the camera
  86.         Sleep(0.5);
  87.         SetCurrentCamera(1);
  88.     }
  89.  
  90.     return;
  91.  
  92. # ===================================================================
  93.  
  94. end
  95.  
  96.